#ifndef CONTROLBOARD_H
#define CONTROLBOARD_H

#include <QWidget>

namespace Ui {
class ControlBoard;
}

class ControlBoard : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(int acce READ acce WRITE setAcce)
    Q_PROPERTY(int brake READ brake WRITE setBrake)
    Q_PROPERTY(int dir READ dir WRITE setDir)

public:
    explicit ControlBoard(QWidget *parent = 0);
    ~ControlBoard();

    int acce() const;

    int brake() const;

    int dir() const;

public slots:
    void carStateChanged(bool ismove);
    void setAcce(int acce);

    void setBrake(int brake);

    void setDir(int dir);

    void carInfo(QStringList info);
signals:
    void viewStateChanged(bool);
    void sysSettings();
    void ctrlStart();
    void ctrlStop();

private slots:
    void on_view_mode_toggled(bool checked);

    void on_start_clicked();

    void on_stop_clicked();

    void on_settings_clicked();

    void on_start_toggled(bool checked);

private:
    Ui::ControlBoard *ui;
    int m_acce;
    int m_brake;
    int m_dir;
};



#endif // CONTROLBOARD_H
